﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace MeetingFinder
{
    public partial class GroupSelection : PhoneApplicationPage
    {
        private List<ProjectGroup> _groupList = null;

        public GroupSelection()
        {
            InitializeComponent();

            var received = App.Current as App;
            availableGroupList.ItemsSource = received._projectGroupList;
        }


        

        //item mouse click event handler
        public void groupItem_Click(object sender, RoutedEventArgs e)
        {
            var toSend = App.Current as App;

            TextBlock selectedGroup = (TextBlock)e.OriginalSource;
            NavigationService.Navigate(new Uri("/CreateMeetingForm.xaml?groupSelected=" + selectedGroup.Text, UriKind.Relative));
        }
    }
}